package com.appspot.didit.client.user;

public class UserManager {
	
	protected static UserManager theInstance;

	protected User user;
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	private UserManager(){
		user = null;
	}
	
	public static UserManager getInstance() {
		if(theInstance == null) {
			theInstance = new UserManager();
		}
		return theInstance;
	}

	public Long getUserId() {
		if(user != null) {
			return user.getId();
		}
		return 0L;
	}
	
}